package org.fioma.general;

public class ReadBytesOnly implements Read {

	byte[] sequence;

	public ReadBytesOnly(byte[] sequence) {
		this.sequence = sequence;
	}

	public ReadBytesOnly(String sequence) {
		this.sequence = Tools.transformToBytes(sequence.toCharArray());
	}

	public ReadBytesOnly(char[] sequence) {
		this.sequence = Tools.transformToBytes(sequence);
	}

	@Override
	public String getId() {
		return null;
	}

	@Override
	public void setId(String id) {

	}

	@Override
	public char[] getSequenceChars() {
		return Tools.transformToChars(sequence);
	}

	@Override
	public void setSequence(char[] sequence) {
		this.sequence = Tools.transformToBytes(sequence);
	}

	public void setSequence(byte[] sequence) {
		this.sequence = sequence;
	}

	@Override
	public String getQuality() {
		return null;
	}

	@Override
	public void setQuality(String quality) {

	}

	@Override
	public int getLength() {
		return sequence[0];
	}

	@Override
	public byte[] getSequenceBytesInverted() {
		return Tools.getBytesInverted(getSequenceBytes());
	}

	@Override
	public byte[] getSequenceBytesComplementar() {
		return Tools.getBytesComplementar(getSequenceBytes());
	}

	@Override
	public byte[] getSequenceBytes() {
		return sequence;
	}

	@Override
	public void setSequence(String sequence) {
		setSequence(sequence.toCharArray());
	}

	@Override
	public String getSequence() {
		return new String(getSequenceChars());
	}

}
